home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
001
/
pibt40s1.arc
/
DISPHELP.MOD
< prev
next >
Wrap
Text File
|
1987-04-01
|
6KB
|
136 lines
(*----------------------------------------------------------------------*)
(* Display_Help --- Display Command List *)
(*----------------------------------------------------------------------*)
PROCEDURE Display_Help( FirstTime : BOOLEAN );
(*----------------------------------------------------------------------*)
(* *)
(* Procedure: Display_Help *)
(* *)
(* Purpose: Displays Command List *)
(* *)
(* Calling Sequence: *)
(* *)
(* Display_Help( FirstTime : BOOLEAN ); *)
(* *)
(* FirstTime --- TRUE for first call, else FALSE *)
(* *)
(* Calls: KeyPressed *)
(* Async_Send *)
(* Restore_Screen *)
(* Save_Screen *)
(* Draw_Menu_Frame *)
(* Read_Kbd *)
(* *)
(*----------------------------------------------------------------------*)
VAR
Ch: CHAR;
(*----------------------------------------------------------------------*)
PROCEDURE Write_Help( Command_Ch : CHAR;
Help_Text : AnyStr;
XPos : INTEGER;
YPos : INTEGER );
BEGIN (* Write_Help *)
WriteSXY( ' Alt-' + Command_Ch + ': ', XPos + 2, YPos + 2, Menu_Text_Color_2 );
WriteSXY( Help_Text, XPos + 12, YPos + 2, Menu_Text_Color );
END (* Write_Help *);
(*----------------------------------------------------------------------*)
BEGIN (* Display_Help *)
(* Tell host to stop sending *)
IF Do_Xon_Xoff_Checks THEN
Async_Send( CHR( XOFF ) );
(* Save current screen image *)
Save_Screen( Saved_Screen );
(* Display help information *)
Draw_Menu_Frame( 2, 1, 78, 24, Menu_Frame_Color, Menu_Title_Color,
Menu_Text_Color, ' Available Commands ' );
Write_Help( 'A', 'Edit line on screen', 1 , 1 );
Write_Help( 'B', 'Send Break', 38, 1 );
Write_Help( 'C', 'Clear Screen', 1, 2 );
Write_Help( 'D', 'Dial a number', 38, 2 );
IF Local_Echo THEN
Write_Help( 'E', 'Toggle local echo (now ON)' , 1, 3 )
ELSE
Write_Help( 'E', 'Toggle local echo (now OFF)', 1, 3 );
Write_Help( 'F', 'File manipulation', 38, 3 );
Write_Help( 'G', 'Execute script', 1, 4 );
Write_Help( 'H', 'Hang up the phone', 38, 4 );
Write_Help( 'I', 'Produce this command list', 1, 5 );
Write_Help( 'J', 'Jump to DOS', 38, 5 );
Write_Help( 'K', 'Set function keys', 1, 6 );
IF Printer_On THEN
Write_Help( 'L', 'Log to printer (now ON)', 38, 6 )
ELSE
Write_Help( 'L', 'Log to printer (now OFF)', 38, 6 );
IF Silent_Mode THEN
Write_Help( 'M', 'Toggle Mute Mode (now ON)', 1, 7 )
ELSE
Write_Help( 'M', 'Toggle Mute Mode (now OFF)', 1, 7 );
Write_Help( 'N', 'New comm. parameters', 38, 7 );
IF Capture_On THEN
Write_Help( 'O', 'Capture session to disk (now ON)', 1, 8 )
ELSE
Write_Help( 'O', 'Capture session to disk (now OFF)', 1, 8 );
Write_Help( 'P', 'Set parameters', 38, 8 );
Write_Help( 'Q', 'Redial last number dialed', 1, 9 );
Write_Help( 'R', 'Receive file from remote', 38, 9 );
Write_Help( 'S', 'Send file to remote', 1, 10 );
Write_Help( 'T', 'Get translate table', 38, 10 );
Write_Help( 'U', 'Screen dump to file', 1, 11 );
Write_Help( 'V', 'View captured text', 38, 11 );
Write_Help( 'W', 'Enter host mode', 1, 12 );
Write_Help( 'X', 'Exit PibTerm', 38, 12 );
Write_Help( 'Y', 'Display session information', 1, 13 );
Write_Help( 'Z', 'Get area code', 38, 13 );
GoToXY( 3 , 16 );
TextColor( Menu_Text_Color_2 );
WRITE('Hit ESC to continue, or Alt-letter to execute command.');
TextColor( Menu_Text_Color );
(* Wait for key to be hit *)
Read_Kbd( Ch ); (* Read 2 chars if 1st was ESC *)
IF ( ( Ch = CHR( ESC ) ) AND KeyPressed ) THEN
BEGIN
READ( Kbd, Ch );
IF ORD( Ch ) IN Alt_Let_Set THEN
Keyboard_Buffer := Keyboard_Buffer + CHR( ESC ) + Ch;
END;
(* Restore previous screen image *)
Restore_Screen( Saved_Screen );
(* Tell host to continue sending *)
IF Do_Xon_Xoff_Checks THEN
Async_Send( CHR( XON ) );
(* Reset global colors *)
Reset_Global_Colors;
END (* Display_Help *);